home *** CD-ROM | disk | FTP | other *** search
/ Core Concepts in Art 2 / Core Concepts in Art (Frames of Reference)(The McGraw-Hill Companies)(2004).iso / mac / media / create.swf / scripts / frame_1 / DoAction_2.as next >
Text File  |  2003-11-06  |  2KB  |  66 lines

  1. if(_root.questionsWithImages == undefined || _root.generatorArray.length == 0)
  2. {
  3.    _root.questionsWithImages = new Array();
  4.    var whereToBegin = _root.dropChapters + 1;
  5.    j = 0;
  6.    while(j < whereToBegin)
  7.    {
  8.       this["chapt" + j] = new Array();
  9.       _root.questionsWithImages.push(this["chapt" + j]);
  10.       j++;
  11.    }
  12.    i = whereToBegin;
  13.    while(i <= _root.howManyChapters)
  14.    {
  15.       duplicateMovieClip(arrayBuilder_mc,"chaptArray" + i,16384 + (100 + i));
  16.       this["chaptArray" + i].num = i;
  17.       if(i < 10)
  18.       {
  19.          loadVariables("txtFiles/Ch0" + i + "questionNum.txt","chaptArray" + i);
  20.       }
  21.       else
  22.       {
  23.          loadVariables("txtFiles/Ch" + i + "questionNum.txt","chaptArray" + i);
  24.       }
  25.       i++;
  26.    }
  27. }
  28. else
  29. {
  30.    findStartChapter();
  31.    i = 0;
  32.    while(i < _root.questionsWithImages[theChapter].length)
  33.    {
  34.       duplicateMovieClip("create_mc.variableHolder_mc","vh" + i,16384 + (200 + i));
  35.       i++;
  36.    }
  37.    j = 0;
  38.    while(j < _root.howManyChapters)
  39.    {
  40.       duplicateMovieClip("create_mc.chapter_mc","chapt" + j,16384 + (300 + j));
  41.       if(j != theChapter - 1)
  42.       {
  43.          create_mc["chapt" + j].highlight_mc._visible = 0;
  44.       }
  45.       if(j < 9)
  46.       {
  47.          create_mc["chapt" + j]._x = create_mc.chapter_mc._x + 12 * j;
  48.       }
  49.       else
  50.       {
  51.          create_mc["chapt" + j]._x = create_mc.chapter_mc._x - 64 + 20 * j;
  52.       }
  53.       var chapterColor = new Color(create_mc["chapt" + j].theChap);
  54.       chapterColor.setRGB(_root.restColor);
  55.       create_mc["chapt" + j].theNum = j + 1;
  56.       greyOutEmptyTitles(j);
  57.       j++;
  58.    }
  59.    create_mc.variableHolder_mc.firstTime = 1;
  60. }
  61. imageLoc = undefined;
  62. create_mc.chapter_mc._visible = 0;
  63. noImage_mc._visible = 0;
  64. var standInColor = new Color("create_mc.ph_standIn");
  65. standInColor.setRGB(_root.specialObjRest);
  66.